Information about the limit
This request is used to get detailed information about the limit.
Request syntax
GET https://b2b-api.go.yandex.ru/integration/2.0/limits?limit_id={limit_id}
Request headers
Authorization: Bearer <OAuth-token>
OAuth access token. The steps to get a token are described in Getting started.
X-YaTaxi-Selected-Corp-Client-Id— client ID from the account. Required if multiple clients are available using the token.
Request parameters
The request may contain the following optional parameters:
limit_id: The id of the limit.
Response field description
Responses may contain the following fields:
|
Field |
Description |
Format |
|
|
Limit ID. |
String |
|
|
The name of the limit. |
String |
|
|
Client ID. |
String |
|
|
ID of the department the limit applies to. If there is no department, it means this is the root department. |
String |
|
|
The list of available service class categories. Specified only for the |
Array of strings |
|
|
The list of available fuel types. Specified only for the |
Array of strings |
|
|
Object |
|
|
|
A block that contains information about geo restrictions. |
Array of objects |
|
|
A block that contains information about time restrictions. |
Array of objects |
|
|
Indicates whether the user can change or remove this limit. |
Boolean |
|
|
The number of employees with this limit. An object with the structure |
Object |
|
|
Indicates whether this limit is used by default (set when the service is activated for the client). |
Boolean |
|
|
ID of the service the limit is set for. |
String |
|
|
Only specified for the |
Array |
|
|
Only specified for the |
Array |
|
|
Only specified for the |
Array |
|
|
Only specified for the |
Boolean |
Structure of the limits object:
|
Field |
Description |
Format |
|
|
A limit on the number of rides that the client can make during the period. Specified only for the |
Object |
|
|
A limit on the amount that the client can spend during the period. |
Object |
Structure of the geo_restrictions array element:
|
Field |
Description |
Format |
|
|
ID of the ride pickup region. If the field is left empty, then any region is allowed. At least the |
String |
|
|
ID of the ride destination region. If the field is left empty, then any region is allowed. At least the |
String |
Structure of the time_restrictions array element:
|
Field |
Description |
Format |
|
|
Restriction type. Acceptable values:
|
String |
|
|
Days of the week when ride orders are available. Acceptable values:
This field is only used for |
Array of strings |
|
|
The time when the order becomes available. Value format: |
String |
|
|
The time when the order will no longer be available. Value format: |
String |
Request example
GET https://b2b-api.go.yandex.ru/integration/2.0/limits?limit_id=41...10
...
Authorization: Bearer <OAuth token>
Response example
The example of response for the Taxi service:
{
"categories": [
"cargo_hour",
"child_tariff",
"lite_b2b",
"maybach",
"minivan",
"optimum_b2b",
"premium_van",
"standart_b2b",
"ultimate",
"vip"
],
"time_restrictions": [],
"geo_restrictions": [],
"id": "41...10",
"client_id": "a2...52",
"service": "taxi",
"title": "Taxi",
"limits": {},
"counters": {
"users": 1
},
"is_default": true,
"enable_toll_roads": true,
"can_edit": true
}
The example of response for the Drive service:
{
"id": "26...40",
"client_id": "a2...52",
"service": "drive",
"title": "Carsharing trips",
"limits": {
"orders_cost": {
"value": "10000",
"period": "month"
}
},
"counters": {
"users": 1
},
"is_default": true,
"cities": [
"kzn",
"msk",
"sochi",
"spb"
],
"tariffs": [
"fix_offer_regular",
"flexible_pack_offer",
"intercity_offer",
"standart_offer"
],
"cars_classes": [
"cargo",
"everyday",
"holiday",
"shuttle"
],
"enable_toll_roads": true,
"time_restrictions": [],
"can_edit": true
}
The example of response for the Eats2 and Grocery services:
{
"id": "99...f7",
"client_id": "a2...52",
"service": "eats2",
"title": "Lunches and snacks",
"time_restrictions": [
{
"type": "weekly_date",
"start_time": "00:00:00",
"end_time": "23:59:00",
"days": [
"sa",
"su"
]
},
{
"type": "weekly_date",
"start_time": "00:00:00",
"end_time": "23:59:00",
"days": [
"fr",
"mo",
"th",
"tu",
"we"
]
},
{
"type": "weekly_date",
"start_time": "00:00:00",
"end_time": "23:59:00",
"days": [
"fr",
"mo",
"th",
"tu",
"we"
]
},
{
"type": "weekly_date",
"start_time": "00:00:00",
"end_time": "23:59:00",
"days": [
"fr",
"mo",
"th",
"tu",
"we"
]
}
],
"geo_restrictions": [],
"limits": {
"orders_cost": {
"value": "1000",
"period": "month",
"accumulation_rules": {
"accumulation_period": "year"
}
}
},
"counters": {
"users": 1
},
"is_default": true,
"is_qr_enabled": false,
"can_edit": true
}
Response codes
The response to this request may contain the following standard HTTP codes:
-
200: Request completed successfully. -
400: An unknown parameter or a parameter with an invalid value was passed in the request. -
403:-
SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header
X-YaTaxi-Selected-Corp-Client-Id(returned if more than one client is available for the token). -
SELECTED_CLIENT_ACCESS_DENIED: the header
X-YaTaxi-Selected-Corp-Client-Idcontains the client's ID, which this login does not have access to.
-
-
404: The requested limit wasn't found.